﻿<UserControl x:Class="Mail.WidgetControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <UserControl.Resources>
        <Storyboard x:Key="ShowCountAnim">
            <DoubleAnimation Storyboard.TargetName="UnreadCountViewBox" Storyboard.TargetProperty="Width" From="0" To="30" Duration="0:0:0.2"/>
            <DoubleAnimation Storyboard.TargetName="UnreadCountViewBox" Storyboard.TargetProperty="(RenderTransform).X" From="-60" To="0" Duration="0:0:0.3" DecelerationRatio="0.3"/>
        </Storyboard>
        <Storyboard x:Key="HideCountAnim">
            <DoubleAnimation Storyboard.TargetName="UnreadCountViewBox" Storyboard.TargetProperty="Width" To="0" Duration="0:0:0.2"/>
            <DoubleAnimation Storyboard.TargetName="UnreadCountViewBox" Storyboard.TargetProperty="(RenderTransform).X" To="-60" Duration="0:0:0.3" DecelerationRatio="0.3"/>
        </Storyboard>
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Image DockPanel.Dock="Left" Source="Resources/mail_icon.png" Width="60" Margin="5,0,0,0"/>
        <Viewbox Name="UnreadCountViewBox" Grid.Column="1" Margin="0,30,10,35" Visibility="Visible" Width="0">
            <Viewbox.RenderTransform>
                <TranslateTransform />
            </Viewbox.RenderTransform>
            <TextBlock Name="UnreadCount" Foreground="White" Text="0" VerticalAlignment="Center" FontWeight="DemiBold"/>
        </Viewbox>
        <TextBlock Foreground="White" Text="Gmail" FontSize="14" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="10,0,0,10"/>
    </Grid>
</UserControl>
